{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "$ref": "#/definitions/ProxyTemplate",
    "definitions": {
        "ProxyTemplate": {
            "properties": {
                "selectors": {
                    "items": {
                        "$ref": "#/definitions/kuma.mesh.v1alpha1.Selector"
                    },
                    "type": "array",
                    "description": "List of Dataplane selectors."
                },
                "conf": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Conf",
                    "additionalProperties": true,
                    "description": "Configuration for ProxyTemplate"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Proxy Template",
            "description": "ProxyTemplate defines the desired state of ProxyTemplate"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Conf": {
            "properties": {
                "imports": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array",
                    "description": "List of imported profiles. +optional"
                },
                "resources": {
                    "items": {
                        "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplateRawResource"
                    },
                    "type": "array",
                    "description": "List of raw xDS resources. +optional"
                },
                "modifications": {
                    "items": {
                        "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications"
                    },
                    "type": "array",
                    "description": "List of config modifications"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Conf"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications": {
            "properties": {
                "cluster": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Cluster",
                    "additionalProperties": true,
                    "description": "Cluster modification"
                },
                "listener": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Listener",
                    "additionalProperties": true,
                    "description": "Listener modification"
                },
                "networkFilter": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.NetworkFilter",
                    "additionalProperties": true,
                    "description": "Network Filter modification"
                },
                "httpFilter": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.HttpFilter",
                    "additionalProperties": true,
                    "description": "HTTP Filter modification"
                },
                "virtualHost": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.VirtualHost",
                    "additionalProperties": true,
                    "description": "Virtual Host modifications"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Modifications",
            "description": "Modifications to xDS config generated by Proxy Template"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Cluster": {
            "properties": {
                "match": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Cluster.Match",
                    "additionalProperties": true,
                    "description": "Only clusters that match will be modified"
                },
                "operation": {
                    "type": "string",
                    "description": "Operation to apply on a cluster (add, remove, patch)"
                },
                "value": {
                    "type": "string",
                    "description": "xDS cluster"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Cluster",
            "description": "Cluster defines modifications to generated clusters"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Cluster.Match": {
            "properties": {
                "origin": {
                    "type": "string",
                    "description": "Origin of the resource generation. (inbound, outbound, prometheus, transparent, ingress)"
                },
                "name": {
                    "type": "string",
                    "description": "Name of the cluster to match"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Match",
            "description": "Match defines match for cluster"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.HttpFilter": {
            "properties": {
                "match": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.HttpFilter.Match",
                    "additionalProperties": true,
                    "description": "Only HTTP filters that match will be modified"
                },
                "operation": {
                    "type": "string",
                    "description": "Operation to apply on network filter (addFirst, addLast, addBefore, addAfter, remove, patch)"
                },
                "value": {
                    "type": "string",
                    "description": "xDS HTTP filter"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Http Filter",
            "description": "HttpFilter defines modifications to generated HTTP filters"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.HttpFilter.Match": {
            "properties": {
                "origin": {
                    "type": "string",
                    "description": "Origin of the resource generation. (inbound, outbound, prometheus, transparent, ingress)"
                },
                "name": {
                    "type": "string",
                    "description": "Name of the network filter"
                },
                "listenerName": {
                    "type": "string",
                    "description": "Name of the listener that http filter modifications will be applied to"
                },
                "listenerTags": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "type": "object",
                    "description": "ListenerTags available in Listener#Metadata#FilterMetadata[io.kuma.tags]"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Match",
            "description": "Match defines match for http filter"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Listener": {
            "properties": {
                "match": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Listener.Match",
                    "additionalProperties": true,
                    "description": "Only listeners that match will be modified"
                },
                "operation": {
                    "type": "string",
                    "description": "Operation to apply on a listener (add, remove, patch)"
                },
                "value": {
                    "type": "string",
                    "description": "xDS listener"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Listener",
            "description": "Listener defines modification to generated listeners"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.Listener.Match": {
            "properties": {
                "origin": {
                    "type": "string",
                    "description": "Origin of the resource generation. (inbound, outbound, prometheus, transparent, ingress)"
                },
                "name": {
                    "type": "string",
                    "description": "Name of the listener to match"
                },
                "tags": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "type": "object",
                    "description": "Tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Match",
            "description": "Match defines match for listener"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.NetworkFilter": {
            "properties": {
                "match": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.NetworkFilter.Match",
                    "additionalProperties": true,
                    "description": "Only network filters that match will be modified"
                },
                "operation": {
                    "type": "string",
                    "description": "Operation to apply on network filter (addFirst, addLast, addBefore, addAfter, remove, patch)"
                },
                "value": {
                    "type": "string",
                    "description": "xDS network filter"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Network Filter",
            "description": "Listener defines modification to generated network filters"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.NetworkFilter.Match": {
            "properties": {
                "origin": {
                    "type": "string",
                    "description": "Origin of the resource generation. (inbound, outbound, prometheus, transparent, ingress)"
                },
                "name": {
                    "type": "string",
                    "description": "Name of the network filter"
                },
                "listenerName": {
                    "type": "string",
                    "description": "Name of the listener that network filter modifications will be applied to"
                },
                "listenerTags": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "type": "object",
                    "description": "ListenerTags available in Listener#Metadata#FilterMetadata[io.kuma.tags]"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Match",
            "description": "Match defines match for network filter"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.VirtualHost": {
            "properties": {
                "match": {
                    "$ref": "#/definitions/kuma.mesh.v1alpha1.ProxyTemplate.Modifications.VirtualHost.Match",
                    "additionalProperties": true,
                    "description": "Only virtual hosts that match will be modified"
                },
                "operation": {
                    "type": "string",
                    "description": "Operation to apply on a virtual hosts (add, remove, patch)"
                },
                "value": {
                    "type": "string",
                    "description": "xDS virtual host"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Virtual Host",
            "description": "VirtualHost defines modification to generated virtual hosts"
        },
        "kuma.mesh.v1alpha1.ProxyTemplate.Modifications.VirtualHost.Match": {
            "properties": {
                "origin": {
                    "type": "string",
                    "description": "Origin of the resource generation. (inbound, outbound, prometheus, transparent, ingress)"
                },
                "name": {
                    "type": "string",
                    "description": "Name of the virtual host to match"
                },
                "routeConfigurationName": {
                    "type": "string",
                    "description": "Name of the route configuration"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Match",
            "description": "Match defines match for virtual host"
        },
        "kuma.mesh.v1alpha1.ProxyTemplateRawResource": {
            "properties": {
                "name": {
                    "type": "string",
                    "description": "The resource's name, to distinguish it from others of the same type of resource."
                },
                "version": {
                    "type": "string",
                    "description": "The resource level version. It allows xDS to track the state of individual resources."
                },
                "resource": {
                    "type": "string",
                    "description": "xDS resource."
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Proxy Template Raw Resource"
        },
        "kuma.mesh.v1alpha1.Selector": {
            "properties": {
                "match": {
                    "additionalProperties": {
                        "type": "string"
                    },
                    "type": "object",
                    "description": "Tags to match, can be used for both source and destinations"
                }
            },
            "additionalProperties": true,
            "type": "object",
            "title": "Selector",
            "description": "Selector defines structure for selecting tags for given dataplane"
        }
    }
}